package com.tom.content;

public class WebSocketContext {

    private static final ThreadLocal<String> GLOBAL_ID = new ThreadLocal<>();

    /**
     * 获取全局事务id
     * @return
     */
    public static String getGlobalId() {
        return GLOBAL_ID.get();
    }

    public static void setGlobalId(String Id) {
        GLOBAL_ID.set(Id);
    }

    public static void removeGlobalId() {
        GLOBAL_ID.remove();
    }


}
